#pragma once
#include "stdafx.h"

template <typename T> class CMatrix
{
public:
	CMatrix(unsigned nrows=1,unsigned ncols=1);
	void Resize(unsigned nrows,unsigned ncols=1);
	class BadSize { };
	T&       operator() (unsigned i, unsigned j=1);
	const T& operator() (unsigned i, unsigned j=1) const;
	class BoundsViolations{ };
	unsigned nrows() const;
	unsigned ncols() const;
private:
	std::vector< std::vector<T> > data_;
};
